#include "devicelistview.h"
#include "ui_devicelistview.h"
#include "adddevicedialog.h"
#include "devicedetailsdialog.h"

DeviceListView::DeviceListView(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::DeviceListView)
{
    ui->setupUi(this);
    loadDevices();
}

DeviceListView::~DeviceListView()
{
    delete ui;
}

void DeviceListView::loadDevices()
{
    // 加载设备列表到QTableView
}

void DeviceListView::on_tableView_clicked(const QModelIndex &index)
{
    // 显示设备详情
}

void DeviceListView::on_addButton_clicked()
{
    AddDeviceDialog addDialog(this);
    addDialog.exec();
    loadDevices();
}

void DeviceListView::on_deleteButton_clicked()
{
    // 批量删除设备操作
}
